package org.yunshang.beltbody.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.converters.url.UrlImageConverter;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import io.github.linpeilie.annotations.ReverseAutoMapping;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.yunshang.beltbody.domain.TBeltBody;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;

import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.yunshang.common.excel.annotation.ExcelDictFormat;
import org.yunshang.common.excel.convert.EasyExceUrlListConverter;
import org.yunshang.common.excel.convert.ExcelDictConvert;
import org.yunshang.style.domain.TStyle;

import java.io.Serial;
import java.io.Serializable;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * 带身信息视图对象 t_belt_body
 *
 * @author Lion Li
 * @date 2024-03-30
 */
@Data
@ExcelIgnoreUnannotated
@ContentRowHeight(80)
@HeadRowHeight(25)
@ColumnWidth(20)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER_SELECTION, verticalAlignment= VerticalAlignmentEnum.CENTER)
@AutoMapper(target = TBeltBody.class)
public class TBeltBodyVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ExcelIgnore
    private Long id;

    /**
     * 款式id
     */
    @ExcelIgnore
    private Long type;
    @ExcelProperty(value = "款式")
    private String typeName;

    /**
     * 面皮
     */
    @ExcelIgnore
    private Long mianpi;

    @ExcelProperty(value = "面皮")
    private String mianpiName;
    /**
     * 面皮颜色
     */
    @ExcelIgnore
    private Long mpColor;
    @ExcelProperty(value = "面皮颜色")
    private String mpColorName;

    /**
     * 面皮材质
     */
    @ExcelProperty(value = "面皮材质")
    private String mpCaizhi;

    /**
     * 底皮
     */
    @ExcelIgnore
    private Long dipi;
    @ExcelProperty(value = "底皮")
    private String dipiName;
    /**
     * 底皮颜色
     */
    @ExcelIgnore
    private Long dpColor;
    @ExcelProperty(value = "底皮颜色")
    private String dpColorName;

    /**
     * 底皮材质
     */
    @ExcelProperty(value = "底皮材质")
    private String dpCaizhi;

    /**
     * 尾形
     */
    @ExcelProperty(value = "尾形", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "business_tail_type")
    private String tailType;

    /**
     * 宽度
     */
    @ExcelProperty(value = "宽度（mm）")
    private String width;

    /**
     * 厚度
     */
    @ExcelProperty(value = "厚度（mm）")
    private String thickness;


    /**
     * 样图
     */
    @ExcelIgnore
    private String img;

    /**
     * 样图地址 id->url
     */
    @ExcelIgnore
    private Map<Long, String> imgMap;
    /**
     * 成本价
     */
    @ExcelProperty(value = "成本价")
    private Long costPrice;

    /**
     * 状态(0：启用，1：禁用)
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=启用,1=禁用")
    private String status;

    @ExcelIgnore
    private String logUrl;

    @ExcelProperty(value = "样图", converter = EasyExceUrlListConverter.class )
    private List<URL> logWebUrl;
}
